<?php
class Marketing_Model_Category extends Zend_Db_Table{
	
	protected $_name 	= 'nam_marketing_category';
	protected $_primary ='id';
	protected $_ids;
	
	public function itemInSelectbox($arrParam = null, $options = null){
		$db = Zend_Registry::get('connectDb');
		//$db = Zend_Db::factory($adapter, $config);
		if($options == null){
			$select = $db	->	select()
							->	from('nam_marketing_category', array('id','name'));
			$result = $db->fetchPairs($select);
			$result[0] = '- Lựa chọn -';
			ksort($result);
		}
		return $result;
	}
}